package com.heima.shengchanzhe;

import java.util.concurrent.FutureTask;

public class TexCa {
    public static void main(String[] args) {

       MyCall m=new MyCall();
        FutureTask<String>f=new FutureTask<>(m);
        Thread T=new Thread(f);
        T.setName("老鼠");

        // T.setPriority(10);
        T.start();
        try {
            T.join();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        MyCall m1=new MyCall();
        //FutureTask<String>f1=new FutureTask<>(m1);
        Thread T1=new Thread(new FutureTask<>(m1),"吃");
       // T1.setName("粮食");
        T1.setDaemon(true);
       //T1.setPriority(1);
        T1.start();

    }
}
